package cn.yeziji.forum.bo.user;

import cn.yeziji.forum.common.AuthUser;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户注册数据对象
 *
 * @author gzkemays
 * @since 2022/4/15 20:27
 */
@Data
@NoArgsConstructor
public class UserRegisterBO {
  String username;
  String password;
  String email;
  String code;

  public UserRegisterBO(String username, String password) {
    this.username = username;
    this.password = password;
  }

  public UserRegisterBO(AuthUser user) {
    this.username = user.getUsername();
    this.password = user.getPassword();
    this.email = user.getEmail();
    this.code = user.getCode();
  }
}
